﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Sx.Web.Admin.Areas.Sys.Models;

namespace Sx.Web.Admin.Areas.Sys.Controllers
{
    [Area("sys")]
    public class IconController : Controller
    {
        private IconService iconService = new IconService();
        /// <summary>
        /// Icon管理
        /// </summary>
        /// <returns></returns>
        public IActionResult Index()
        {

            return View();
        }

        public IActionResult IndexAjax()
        {
            string where = "";
            return Json(iconService.Page("Id,iconCls,iconText", where, "icoCls"));
        }


        public IActionResult comboDs()
        {
            return Json(iconService.GetList<dynamic>(where: "",
                select: "icon_Cls as value,icon_Text as text,icon_Cls as iconCls",
                order: "icon_Text"));
        }
    }
}